<?php

namespace Partner\Model;

use Utuo\UtuoModel;

class SlideModel extends UtuoModel {
	
	// 自动完成
	protected $_auto = array(
			array('data', 'getSlideConfig', self::MODEL_BOTH, 'callback'),
	);
	
	
	// 轮播图
	public function getSlideConfig() {
		if(!isset($_REQUEST['data'])) return false;
		$slide_images = I("data");
		$result = array();
		foreach ($slide_images as $v) $v['img'] and $result[] = array('img' => $v['img'], 'title' => $v['title'], 'url' =>  $v['url']);
		return serialize($result);
	}
	
}